

const express = require('express');
const merchantController = require('../controllers/merchant.server.controller');
const multiparty = require('connect-multiparty')
const multipartMiddleware = multiparty();

module.exports = (app) => {
    const router = express.Router();
    router.route('/register').post(multipartMiddleware,merchantController.register);
    router.route('/re/register').post(multipartMiddleware,merchantController.reRegister);
    router.route('/login').post(merchantController.login);
    router.route('/logout').delete(merchantController.logout);
    router.route('/').get(merchantController.getMerchantInfo);
    router.route('/status').get(merchantController.getMerchantStatus);
    app.use('/merchants', router);
};